package com.ruoyi.workflow.service;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.workflow.domain.OaFace;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @描述 人脸识别相关接口service
 * @版本 v1
 * @作者 wangxuqing
 * @日期 2023-07-26 09:23
 */
public interface IFaceRecognitionService {
    JSONObject createFaceSet(String outerId);

    void deleteFaceByPrimaryKey(OaFace oaFace);

    JSONObject setUserId(String faceToken, String userId);

    JSONObject detect(byte[] imageBytes);

    byte[] processImage(MultipartFile file, int minWidth, int minHeight, int maxWidth, int maxHeight, int maxImageSize, String fileExtension);

    JSONObject getAllFaceSets();

    JSONObject deleteFaceSet(String outerId, String faceSetToken, Integer checkEmpty);

    JSONObject getDetailOfFaceSet(String outerId, String faceSetToken, Integer start);

    JSONObject addFace(String outerId, String faceSetToken, String faceToken, String userId, String attachment);

    Map addFaceByZip(MultipartFile file, String outerId, String faceSetToken);

    JSONObject search(byte[] imageBytes, String outerId, String faceSetToken);

    JSONObject removeFaceByFaceToken(String outerId, String faceSetToken, String faceTokens);

    JSONObject removeFaceByFaceTokenList(String outerId, String faceSetToken, List<String> faceTokenList);

    JSONObject removeFaceByUserId(String outerId, String faceSetToken, Long userId);
}
